home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / SLTPU70C / STYLEDEF.REF < prev    next >
Text File  |  1993-09-15  |  6KB  |  179 lines

  1.  
  2. The follwing is a reference of the data types provided by STYLEDEF.TPU.
  3. Note: do not attempt to compile this file.  Doing so may cause the
  4. updated STYLEDEF.TPU file to be incompatible with the other TPU files.
  5.  
  6.  
  7. Const MaxStyles = 16;             { Number of available styles }
  8.  
  9. Procedure RipStyleInit;           { Opens file, clears stack, loads style 1 }
  10.                                   { CONFIG file must be opened first }
  11.  
  12. Procedure WriteStyleHeader;       { Update style file header }
  13. Procedure CloseStyleFile;         { Close styles file }
  14.  
  15. Procedure ClearStyleStack;           { Clears style stack }
  16. Procedure GetRipStyle (n: integer);  { Loads style, doesn't save old style }
  17. Procedure SetRipStyle (n: integer);  { Loads style, saves old style on stack }
  18. Procedure SaveRipStyle (n: integer); { Save global style to style file }
  19. Procedure ResetRipStyle;             { Restores old style from stack }
  20.  
  21.  
  22. { The following data types define what a 'Rip Style' looks like on disk
  23.   and in memory. The fields in these data types closely match what you see
  24.   in the CONFIG program when editing the RIP styles and RIP general setup
  25.   options. }
  26.  
  27. Type
  28.   Flagstype = array[1..2] of word;
  29.  
  30.   WinPosType = (WP_CC,WP_TL,WP_TC,WP_TR,WP_CL,WP_CR,WP_BL,WP_BC,WP_BR,
  31.                 WP_USER,WP_EXACT);
  32.  
  33.   WinAttrType = record      { These are the Window Attributes }
  34.     dfore,
  35.     bright,
  36.     dark,                    { Colors: foreground, bright, dark, etc. }
  37.     surface,
  38.     corner_col : integer;
  39.     font: byte;              { Font. See below for possible values. }
  40.     fonthi: byte;            { not used }
  41.     fontsize : integer;      { Font size. Values range from 1 to 10. }
  42.     bevsize : integer;       { Bevel size. }
  43.     flags : flagstype;       { See note below }
  44.     winpos : WinPosType;     { See note below }
  45.     disable : boolean;       { If set, the window is disabled }
  46.     x0,y0,x1,y1 : integer;   { Window position, if WinPos=WP_USER }
  47.     dback: integer;          { Background color }
  48.   end;
  49.  
  50.   TitPosType = ( TP_CENTER, TP_USER);
  51.  
  52.   TitAttrType = record      { These are the Title attributes }
  53.     dfore,
  54.     dback,
  55.     bright,                  { Colors }
  56.     dark,
  57.     surface,
  58.     corner_col : integer;
  59.     font: byte;              { Font; see below }
  60.     fonthi: byte;            { Not used }
  61.     fontsize : integer;      { Font size, 1 to 10 }
  62.     bevsize : integer;       { Bevel size }
  63.     flags : flagstype;       { Flags; see below }
  64.     titpos : titpostype;     { Title position; see below }
  65.     disable : boolean;       { If true, the title is disabled }
  66.     extra : array [1..8] of byte;
  67.   end;
  68.  
  69.   ButAttrType = record      { These are the button attributes }
  70.     dfore,
  71.     dback,
  72.     bright,                  { Colors }
  73.     dark,
  74.     surface,
  75.     uline_col,
  76.     corner_col : integer;
  77.     font: byte;              { Font; see below }
  78.     fonthi: byte;            { Unused }
  79.     fontsize : integer;      { Font size, 1 to 10 }
  80.     orient : integer;        { Button orientation. See explanation below. }
  81.     wid,
  82.     hgt,
  83.     spc : integer;           { Button width, height, and spacing }
  84.     bevsize : integer;       { Bevel size }
  85.     flags : flagstype;       { See flags explanation below }
  86.     extra : array[1..32] of byte;
  87.   end;
  88.  
  89.  
  90.   RIPFeatures = (RIPDialog,RIPopup,RIPEditor,RIPSubboard,
  91.                  RIPBulletin,RIPQuote);
  92.  
  93.   StyleHeaderType = record         { This is the RIP General Setup info }
  94.     RipMenuSuspend: boolean;     { 'RIP On All Help Levels' question }
  95.     NonRipMenu: boolean;         { 'Display ANSI in RIP Mode' question }
  96.     Styles: array[RIPDialog..RIPQuote] of byte;  { RIP styles for features }
  97.     extra: array[1..504] of byte;
  98.   end;
  99.  
  100.   RipStyleType = record
  101.     Name : string[8];             { Name of the RIP style }
  102.     Desc : string[30];            { Description of the style }
  103.     WinAttr : WinAttrType;        { Window attributes }
  104.     TitAttr : TitAttrType;        { Title attributes }
  105.     ButAttr : ButAttrType;        { Button attributes }
  106.     extra : array[1..344] of byte;
  107.   end;
  108.  
  109.  
  110. Var RipStyle: RipStyleType;   { Global RIP style record (current style) }
  111.     RipCf: StyleHeaderType;   { RIP General Setup information }
  112.     CurrStyle: integer;       { Currently set style number }
  113.  
  114.  
  115. { These are the values for 'Font':
  116.     0: Default
  117.     1: Triplex
  118.     2: Small
  119.     3: SansSerif
  120.     4: Gothic
  121.     5: Script
  122.     6: Simplex
  123.     7: TriScript
  124.     8: Complex
  125.     9: European
  126.    10: Bold
  127.  
  128.   These are the values for 'WinPos':
  129.     0: Center
  130.     1: Top Left
  131.     2: Top Center
  132.     3: Top Right
  133.     4: Center Left
  134.     5: Center Right
  135.     6: Bottom Left
  136.     7: Bottom Center
  137.     8: Bottom Right
  138.     9: User Defined
  139.  
  140.   These are the values for 'TitPos':
  141.     0: Top Center
  142.     1: User Defined
  143.  
  144.   These are the values for 'Orient' (Button orientation):
  145.     0: Above
  146.     1: Left
  147.     2: Center
  148.     3: Right
  149.     4: Beneath
  150.  
  151.  
  152.   RIP Style Flags
  153.  
  154.   Variables of type 'FlagsType' consist of two words; within each word,
  155.   bits are set to indicate special features. This structure corresponds
  156.   directly to RIPscrip data structures, although Searchlight does not
  157.   make use of all of the features defined by RIPscrip. Here is a bit by
  158.   bit layout (with Bit 0 being the first bit of each word) showing the
  159.   features we do use:
  160.  
  161.   First Word:
  162.     Bit  3: Chiseled
  163.     Bit  4: Recessed
  164.     Bit  5: Drop Shadow
  165.     Bit  8: Beveled
  166.     Bit 10: Underline Hotkey
  167.     Bit 12: Adjust Vertical Center
  168.     Bit 14: Sunken
  169.  
  170.   Second Word:
  171.     Bit  1: Highlight Hotkey
  172.     Bit  2: Explode
  173.     Bit  3: Left Justify Label
  174.     Bit  4: Right Justify Label
  175.  
  176.   Note that Searchlight does not support all of these switches for all of
  177.   the style components. Refer to the CONFIG program to see which switches
  178.   are supported for Window, Title and Button attributes.
  179. }